<!--
 * @Author: wangmingshuo
 * @Date: 2020-04-22 16:29:31
 * @LastEditTime: 2020-06-10 14:59:22
 * @FilePath: /myLittleNest/components/Banner/index.vue
 -->
<template>
	<div>
		<template>
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div class="swiper-slide">
						<div class="img"></div>
						<div class="headerIn">
							<div class="headPortrait" :style="{ backgroundImage: 'url(' + '/images/anthony.jpg' + ')' }"></div>
							<div class="inBottomTitle">
								<h3>Wang Ming Shuo</h3>
								<p>WEB DEVELOPER, PHOTOGRAPHER</p>
							</div>
						</div>
						<div class="mark"></div>
					</div>
				</div>
				<!-- 如果需要分页器 -->
				<div class="swiper-pagination"></div>
			</div>

			<template>
				<!-- <v-chart class="my-chart" :options="bar" /> -->
				<!-- <highcharts :options="options"></highcharts> -->
			</template>
		</template>
	</div>
</template>

<script>
import Swiper from 'swiper';
// import 'swiper/dist/css/swiper.min.css';
// import ECharts from "vue-echarts/components/ECharts";
// import "echarts/lib/chart/bar";
// import "echarts/lib/chart/gauge";
// import { log } from 'util';

export default {
	props: {},
	data() {
		return {
			id: 'chart',
		};
	},
	created() {
		// this.setSwiper()
		// this.setCharts()
	},
	mounted() {
		this.id;
		// new Swiper('.swiper-container', {})
		// setInterval(() => {
		// 	this.bar.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
		// 	this.bar.series[1].data[0].value = (Math.random() * 7).toFixed(2) - 0;
		// 	this.bar.series[2].data[0].value = (Math.random() * 2).toFixed(2) - 0;
		// 	this.bar.series[3].data[0].value = (Math.random() * 2).toFixed(2) - 0;

		// }, 2000)
	},
	methods: {},
};
</script>

<style scoped lang="scss">
@keyframes pulsate {
	0% {
		filter: drop-shadow(0 0 5px rgba(55, 140, 63, 0.6));
	}

	50% {
		filter: drop-shadow(0 0 15px rgba(55, 140, 63, 0.6));
	}
	100% {
		filter: drop-shadow(0 0 5px rgba(55, 140, 63, 0.6));
	}
}

.swiper-container {
	width: 100%;
	height: 550px;
	background-color: #fff;
	box-shadow: 3px 0 5px #ccc;
}

.swiper-slide {
	position: relative;
	background: linear-gradient(0deg, rgba(44, 44, 44, 0.2), rgba(55, 140, 63, 0.6));
	height: 550px;
	& > .img {
		position: absolute;
		width: 100%;
		height: 550px;
		background: url('/images/cc-bg-1.jpg') no-repeat center center;
		background-size: 100% 100%;
	}

	& > .headerIn {
		position: absolute;
		top: 60%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 888px;
		height: 400px;
		margin: 0 auto;
		z-index: 99;

		& > .headPortrait {
			position: absolute;
			top: 0;
			left: 50%;
			transform: translateX(-50%);
			width: 180px;
			height: 180px;
			box-sizing: border-box;
			transition: all 0.5s linear;
			background-position: center center;
			background-size: 100%;
			border-radius: 50%;
			cursor: pointer;
			animation: pulsate ease 2s infinite;
		}
		& > .inBottomTitle {
			width: 100%;
			position: absolute;
			bottom: 80px;
			left: 50%;
			transform: translateX(-50%);
			color: #fff;
			text-align: center;

			& > h3 {
				font-weight: 700;
				font-size: 32px;
				margin-bottom: 20px;
			}

			& > p {
				width: 100%;
				font-size: 21px;
			}
		}
	}

	& > .mark {
		position: absolute;
		width: 100%;
		height: 550px;
		background-color: rgba(0, 0, 0, 0.5) !important;
	}
}

.my-chart {
	width: 100%;
	height: 500px;
	background: rgba(0, 0, 0, 0.3) !important;
}
</style>
